// 下拉框加载
export default {
  directives: {
    loadMore: {
      bind(el, binding) {
        // 获取element，定义scroll
        let select_dom = el.querySelector(
          ".el-select-dropdown .el-select-dropdown__wrap"
        );
        select_dom.addEventListener("scroll", function () {
          let height =
            Math.floor(this.scrollHeight - this.scrollTop) <= this.clientHeight;
          if (height) {
            binding.value();
          }
        });
      },
    },
  },
};
